package com.test.thread;

public class VirtualThreadDemo {
    public static void main(String[] args) throws InterruptedException {
        Thread.ofPlatform().start(() -> System.out.println(Thread.currentThread()));
        Thread vt = Thread.ofVirtual().start(() -> System.out.println(java.lang.Thread.currentThread()));
        // 等待虚拟线程执行完成再退出主程序
        vt.join();
    }
}
